<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>react 练习part07</title>
		<script src="../build/react.js"></script>
		<script src="../build/react-dom.js"></script>
		<script src="../build/browser.min.js"></script>
	</head>
	<body>
		<div id="app"></div>
		<script type="text/babel">
			var MyComponent = React.createClass({
				handleClick:function(){
					this.refs.myTextInput.focus();
					this.refs.myTextInput.value="lhz";
				},
				render:function(){
					return (
						<div>
							<input type="text" ref="myTextInput" />
							<input type="button" value="Focus the text input" onClick={this.handleClick} />
						</div>
					);
				}
			})
			
			ReactDOM.render(
				<MyComponent />,
				document.getElementById('app')
			)
		</script>
	</body>
</html>
